home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0919.dms / q0919.adf / man / Prompt < prev    next >
Text File  |  1997-04-10  |  4KB  |  119 lines

  1.  
  2.  
  3.  
  4.      Prompt(V1.3 in C:) (2.x/3.x internal)      
  5.  
  6.  
  7.      NAME
  8.           Prompt - changes the prompt for the CLI or Shell.
  9.  
  10.      SYNOPSIS
  11.           Prompt "Prompt"
  12.  
  13.      DESCRIPTION
  14.             Prompt sets a new prompt for the current CLI.  Prompt 
  15.         with no argument resets the CLI prompt to the default, 
  16.         which is just "> ".  Shells differ in their 
  17.         interpretation of special characters for the prompt.  For 
  18.         example, the Shell will accept the following characters 
  19.         in its prompt string:
  20.  
  21.          %S            - expands to pathname of current directory
  22.          %N            - expands to current task number.
  23.          %R            -2.x/3.x Only: expands to the Return Code
  24.                         for the last program that was executed
  25.                         from that SHELL. 
  26.  
  27.             The CLI default prompt is n>, with 'n' being the task 
  28.         number associated with the current task number of that 
  29.         shell. For instance, the if no other applications are 
  30.         running, and the shell is open, the prompt will be 1>. If 
  31.         there are two other tasks running, the prompt will be 3>.
  32.  
  33.             If used with a SHELL instead of the CLI, PROMPT can 
  34.         display the current directory as part of the command 
  35.         prompt. If you look at your s/Shell-startup script file, 
  36.         you will see how the PROMPT command changes the default 
  37.         string to the task number of the SHELL, followed by a 
  38.         period, then the current directory path, a 
  39.         right-angle-bracket, then a space.
  40.  
  41.  
  42.      KEYWORDS
  43.           "Prompt"
  44.             The string that replaces the active CLI's prompt. If 
  45.         "Prompt" is left blank, then the prompt will be changed 
  46.         to >. You can designate up to 59 characters for your 
  47.         string.  If there are any spaces, then you must enclose 
  48.         the entire string in quotation marks. You may also use 
  49.         ANSI escape sequences to change the prompt color, or 
  50.         italics.
  51.  
  52.             Here is a complete list of the ANSI escape 
  53.         characters:
  54.  
  55.           ESC-[1m  Switches to BOLD characters.
  56.           ESC-[2m  Switches character color to color 3.
  57.           ESC-[3m  Switches Italics on.
  58.           ESC-[4m  Switches Underline on.
  59.           ESC-[7m  Switches Reverse video on.
  60.           ESC-[8m  Switches background color off.
  61.           ESC-[0m  Switches to normal characters.
  62.           ESC-c    Switches to normal characters and clears
  63.                    the screen.
  64.  
  65.             ** When using these ESC key combinations, don't type 
  66.         'ESC', instead, press the 'Esc' key on your keyboard. You 
  67.         will then see a reverse video bracket as your printed 
  68.         character. After that reverse video character you can 
  69.         type in the rest of the Escape sequence.
  70.  
  71.             ** You may also use the keys "*e" (an asterix 
  72.         followed by the letter 'e').  This will have the same 
  73.         effect as using the ESC key. Actually, it is better 
  74.         because some editors (such as CEd, Ed, and others) uses 
  75.         the ESC key to enter the command mode.
  76.  
  77.           
  78.     EXAMPLES
  79.  
  80.             1) To change the current prompt to 'Amiga!:'
  81.  
  82.           PROMPT Amiga!
  83.  
  84.  
  85.             2) To change the current prompt to 'Mehedi Who?:'
  86.  
  87.           PROMPT "Mehedi Who?"
  88.  
  89.  
  90.             3) To change the current prompt to 'Amiga Task n 
  91.         Waiting' (where n is the current task number):
  92.  
  93.           PROMPT "Amiga Task %N Waiting "
  94.  
  95.           
  96.             4) To change the current prompt to show the task 
  97.         number and current directory in reverse text, seperated 
  98.         by angle brackets:
  99.  
  100.           PROMPT "<esc>[7m%N>>%S><esc>[0m "
  101.  
  102.  
  103.             5) To show the date and time with each prompt 
  104.         (2.x/3.x only):
  105.  
  106.           PROMPT "'DATE*' > "
  107.  
  108.             This uses the apostrophe (back tick) character to 
  109.         output the result of the DATE command to the prompt 
  110.         string. The asterisk character is used as an escape to 
  111.         indicate that the DATE command is to be executed each 
  112.         time the prompt string is printed. If this escape 
  113.         character is not used, the prompt string will always 
  114.         print the same time and date. (see backtick for more
  115.         information on this command).
  116.  
  117.             See Also: Asterix
  118.  
  119.